package com.example.activitylifecycle;

import org.apkplug.Bundle.BundleActivityLifecycleCallbacks;

import android.app.Activity;
import android.os.Bundle;

public class BundleActivityLifecycleCallbacksImp implements BundleActivityLifecycleCallbacks{

	@Override
	public void onActivityCreated(Activity arg0, Bundle arg1) {
		System.out.println("Created:"+arg0.getClass().getCanonicalName());
		//保持信息到StringBuffer中 在MainActivity中显示
		ActivityLog.addLog("Created:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivityDestroyed(Activity arg0) {
		System.out.println("Destroyed:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("Destroyed:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivityPaused(Activity arg0) {
		System.out.println("Paused:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("Paused:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivityResumed(Activity arg0) {
		System.out.println("Resumed:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("Resumed:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivitySaveInstanceState(Activity arg0, Bundle arg1) {
		System.out.println("SaveInstanceState:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("SaveInstanceState:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivityStarted(Activity arg0) {
		System.out.println("Started:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("Started:"+arg0.getClass().getCanonicalName());
	}

	@Override
	public void onActivityStopped(Activity arg0) {
		System.out.println("Stopped:"+arg0.getClass().getCanonicalName());
		ActivityLog.addLog("Stopped:"+arg0.getClass().getCanonicalName());
	}
}